<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>商品类型编辑</title>
<#include "/WEB-INF/content/module-edit.html">
<script type="text/javascript">
var sysStatus = [
    {"id":"0","text":"未推送"},
    {"id":"1","text":"已推送"}
];
var oper=[
      	{"id":"0","text":"android"},
      	{"id":"1","text":"ios"},
      	{"id":"2","text":"所有"}
      ];
$(function() {
  	$("#status").combobox({
  		valueField : 'id',
  		textField : 'text',
  		editable:false,
  		data:sysStatus
  	}); 
  	$("#os").combobox({
  		valueField : 'id',
  		textField : 'text',
  		editable:false,
  		data:oper
  	});
 });
</script>
<style>
.input-width{
	width: 95%;
}
</style>
 
</head>
<body class="easyui-layout">
	<div region="north" id="toolbar" style="background-color: #eee; padding: 5px; overflow: hidden;" border="false">
		<#if object.nid?exists&&object.nid!="">
			<@auth code="message:notice:update">
				<a href="javascript:void(0);" class="easyui-linkbutton" plain="true" iconCls="icon-add" style="border: 1px solid #ccc" onclick="javascript:save()">保存</a>
			</@auth>
		<#else>
			<@auth code="message:notice:create">
				<a href="javascript:void(0);" class="easyui-linkbutton" plain="true" iconCls="icon-add" style="border: 1px solid #ccc" onclick="javascript:save()">保存</a>
			</@auth>
		</#if>
		<a href="javascript:void(0);" class="easyui-linkbutton" plain="true" iconCls="icon-edit" style="border: 1px solid #ccc" onclick="javascript:cancel()">关闭</a>
	</div>
	<div region="center">
		<div id="p" class="easyui-panel" style="background: #fafafa; padding: 10px" fit="true" toolbar="#toolbar">
			<form id="form" method="post">
				<input id="_id" name="nid" type="hidden" value="${(object.nid)!}">
				<table class="form" cellspacing="0" style="width: 100%">
					<tbody style="border: 1px solid #ccc">
						<tr>	
							<td class="label">标题：</td>
							<td><input id="title" name="title" style="width:90%;" required="true" value="${object.title!}" /></td>
							<td class="validate"></td>													
						</tr>	
						<tr>
							<td class="label">有效时间截止：</td>
							<td><input id="validatetime" name="validatetime" class="easyui-datetimebox" required="true" value="${object.validatetime!}" /></td>
							<td class="validate">*</td>		
							<td class="label">平台：</td>
							<td><input id="os" name="os" required="true" value="${object.os!'2'}" /></td>
							<td class="validate"></td>													
						</tr>											
						<tr>
							<td class="label">内容：</td>
							<td colspan="4"><textarea id="content" name="content" class="easyui-validatebox" required="true" style="width:90%;">${(object.content)!}</textarea></td>
							<td class="validate">*</td>	
						</tr>
					</tbody>
				</table>
			</form>
		</div>
	</div>
</body>
</html>